package banmuoi.entity;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="Permissions")
public class Permission implements Serializable{
	@Id
	Integer id;
	public void setId(Integer id) {
		this.id = id;
	}
	String page, role;
	
	public void setPage(String page) {
		this.page = page;
	}
	public void setRole(String role) {
		this.role = role;
	}
	@OneToMany(mappedBy="permission")
	Collection<Admin> admins;
	
	public Collection<Admin> getAdmins() {
		return admins;
	}
	public void setAdmins(Collection<Admin> admins) {
		this.admins = admins;
	}
	
	
	public Integer getId() {
		return id;
	}
	public String getPage() {
		return page;
	}
	public String getRole() {
		return role;
	}
}
